home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2002 November / CD 1 / APC0211D1.ISO / workshop / prog / files / ActivePerl-5.6.1.633-MSWin32.msi / _5701f7cec15d60103a1ee64ffaea9e52 < prev    next >
Encoding:
Text File  |  2002-05-30  |  1.8 KB  |  78 lines

  1.  
  2. =head1 NAME
  3.  
  4. Tk::LabFrame - labeled frame.
  5.  
  6. =for pm Tixish/LabFrame.pm
  7.  
  8. =for category Tix Extensions
  9.  
  10. =head1 SYNOPSIS
  11.  
  12. S<    >B<use Tk::LabFrame;>
  13.  
  14. S<    >I<$f> = I<$parent>-E<gt>B<LabFrame>(?B<-label>=E<gt>I<text>,
  15. B<-labelside>=E<gt>I<where>, ...?);
  16.  
  17. =head1 DESCRIPTION
  18.  
  19. B<LabFrame> is exactly like B<Frame> and additionaly allows to
  20. add a label to the frame.
  21.  
  22. =head1 WIDGET-OPTIONS
  23.  
  24. B<LabFrame> supports the same options as the
  25. L<Frame|Tk::Frame/"STANDARD OPTIONS"> widget.
  26.  
  27. Additional options of B<LabFrame> are:
  28.  
  29. =over 4
  30.  
  31. =item B<-label> =E<gt> I<text>
  32.  
  33. The text of the label to be placed with the Frame.
  34.  
  35. =item B<-labelside> =E<gt> I<where>
  36.  
  37. I<Where> can be one of B<left>, B<right>, B<top>, B<bottom> or B<acrosstop>.
  38. The first four work as might be expected and place the label to the
  39. left, right, above or below the frame respectively. The B<acrosstop>
  40. creates a grooved frame around the central frame and puts the label
  41. near the northwest corner such that it appears to "overwrite" the
  42. groove.
  43.  
  44. =back
  45.  
  46. =head1 EXAMPLE
  47.  
  48. Run the following test program to see this in action:
  49.  
  50.     use strict;
  51.     use Tk;
  52.     require Tk::LabFrame;
  53.     require Tk::LabEntry;
  54.  
  55.     my $test = 'Test this';
  56.     my $mw = Tk::MainWindow->new;
  57.     my $f = $mw->LabFrame(-label => "This is a label",
  58.                -labelside => "acrosstop");
  59.     $f->LabEntry(-label => "Testing", -textvariable => \$test)->pack;
  60.     $f->pack;
  61.     Tk::MainLoop;
  62.  
  63. =head1 BUGS
  64.  
  65. Perhaps B<LabFrame> should be subsumed within the generic pTk
  66. labeled widget mechanism.
  67.  
  68. =head1 AUTHOR
  69.  
  70. B<Rajappa Iyer> rsi@earthling.net
  71.  
  72. This code is derived from LabFrame.tcl and LabWidg.tcl in the Tix4.0
  73. distribution by Ioi Lam. The code may be redistributed under the same
  74. terms as Perl.
  75.  
  76. =cut
  77.  
  78.